﻿mainModule.controller('BaseEditTabsCtrl', ["$scope", function ($scope) {
    "use strict";
    hide();

    function hide() {
        $scope.isVisible = false;
    }
    function show() {
        $scope.isVisible = true;
    }

    $scope.$on("itemEditing", function (e, id) {
        show();
    });

    $scope.$on("itemAdding", function (e, id) {
        show();
    });

    $scope.$on("itemSearching", function (e) {
        hide();
    });

    $scope.$on("itemRemoving", function (e) {
        hide();
    });
}]);